<!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title></title>

        <style>

            .mystyle{
                box-sizing: border-box;
                width:0px;
                height:500px;
                
                transition: width 3s;
            }

           
        
        </style>
        
    </head>
    <body>
      <button onclick="document.querySelector('div.mystyle').style.width='200px';">ddd</button>
      <div class="mystyle"></div>

       
       
        
    </body>

</html>